<template>
    <div class="radio-wrapper" @click="handleCheckThis">
        <div class="radio" :class="[check ? 'radio-check' : 'radio-uncheck']">
            <div class="radio-inner" :class="[check ? 'radio-inner-check' : 'radio-inner-uncheck']"></div>
        </div>
        <text class="radio-label">{{word}}</text>
    </div>
</template>

<script>
export default {
  name: 'radio',
  props: ['check', 'word'],
  methods: {
    handleCheckThis () {
      this.$emit('doclick')
    }
  }
}
</script>

<style scoped>
    .radio-wrapper {
        flex-direction: row;
        align-items: center;
    }
    .radio {
        width: 24px;
        height: 24px;
        margin-right: 16px;
        border-width: 1px;
        border-style: solid;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
    }
    .radio-uncheck {
        border-color: #cecece;
    }
    .radio-check {
        border-color: #fecb01;
    }
    .radio-inner {
        width: 14px;
        height: 14px;
        border-radius: 7px;
    }
    .radio-inner-uncheck {
        border-width: 1px;
        border-style: solid;
        border-color: #cecece;
        background-color: #fff;
    }
    .radio-inner-check {
        border-width: 0px;
        background-color: #fecb01;
    }
    .radio-label {
        font-size: 28px;
        font-family: medium;
        color: #666;
    }
</style>
